/**
 * Created by IntelliJ IDEA.
 * User: Egor
 * Date: 27.11.11
 * Time: 9:43
 * To change this template use File | Settings | File Templates.
 */
package org.electronic.registration.service {
import org.electronic.registration.bo.Doctor;

public class DoctorService {

    private var doctorService:RemoteService;

    public function DoctorService(additionalFaultHandler:Function = null) {
        doctorService = new RemoteService("doctorService");
        if(additionalFaultHandler != null){
            doctorService.addFaultHandler(additionalFaultHandler);
        }
    }

    public function getAllDoctors(handler:Function):void {
        doctorService.getAllDoctors(handler);
    }

    public function getDoctorByName(name:String,  handler:Function):void{
        doctorService.getDoctorByName(name,  handler);
    }

    public function save(doctor:Doctor):void{
        doctorService.save(doctor);
    }
}
}
